<?php /* УТФ-8:fix */

class SPImodel__consts__front extends SPImodel__consts
{
    public function select()
    {
        $query =    " SELECT * "
               .      " FROM ".SPIcfg::$store['table:consts']
               .     " WHERE TRUE "
               ;

        return SPIstore::I()->query( $query );
    }

    public function get_by_key( $key )
    {
        $query =    " SELECT * "
               .      " FROM ".SPIcfg::$store['table:consts']
               .     " WHERE key = '" . addslashes($key) . "'"
               ;

        return SPIstore::I()->query( $query )->fetch_and_close();
    }
}
